package com.sky.mapper;


import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishflavorMapper {

    /**
     * 批量插入口味数据
     * @param flavors
     */
    void insertbatch(List<DishFlavor> flavors);

    /**
     * 根据菜品id删除对应的口味数据
     * @param dishids
     */
    void deleteByDishIds(List<Long> dishids);

    @Delete("delete from dish_flavor where dish_id=#{flavorid}")
    void deleteByDishId(Long flavorid);
}
